package com.czr.dao.entity;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * <p>
 * 帖子表
 * </p>
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("czr_reply")
@ApiModel(value="czr_reply对象", description="帖子")
public class CzrReply extends Model<CzrReply> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键(不用传)")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "评论")
    @NotEmpty(message = "评论不能为空！")
    @TableField("comment")
    private String comment;

    @ApiModelProperty(value = "帖子id")
    @TableField("postId")
    private Integer postId;

    @ApiModelProperty(value = "发帖时间")
    @TableField("pub_time")
    private String pubTime;

    @ApiModelProperty(value = "点赞数")
    @TableField("like_count")
    private Integer likeCount;

    @ApiModelProperty(value = "评论回复id")
    @TableField("replyId")
    private Integer replyId;

    @ApiModelProperty(value = "状态  0正常 -1删除")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "级别（不用传）")
    @TableField("level")
    private Integer level;

    @ApiModelProperty(value = "回帖人id（不用传）")
    @TableField("userId")
    private Integer userId;

    @ApiModelProperty(value = "评论id（不用传）")
    @TableField("old_userId")
    private Integer oldUserId;

    @ApiModelProperty(value = "回帖id（不用传）")
    @TableField("old_replyId")
    private Integer oldReplyId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
